The present invention relates generally to data processing systems and, more particularly, to querying and executing commands of an application program.
In Microsoft OLE 2.01, a xe2x80x9ccontainee objectxe2x80x9d is contained within a xe2x80x9ccontainer object.xe2x80x9d The container object is associated with a xe2x80x9ccontainer application programxe2x80x9d and the containee object is associated with a xe2x80x9cserver application program.xe2x80x9d The server application program provides the containee object to the container application program for embedding within the container object. Each object has an associated tool bar which displays icons representing commands. A command is an action which may be performed by the associated application program. When a containee object is selected and an operation to be performed on the containee object, such as displaying the containee object for viewing, is specified (i.e., the containee object is activated), by convention, a user interface is displayed showing the containee object""s tool bar and not the container object""s tool bar. The containee object""s tool bar contains commands which apply to the container object, such as the Save command, and commands which apply only to the activated containee object, such as an AutoSum command. Commands which apply to the container object are supported by the container application program. Commands which apply to the containee object are supported by the server application program. The server application program does not perform commands which apply to the container object. Therefore, the server application program disables commands in its tool bar which apply to the container object.
A user may execute a command by selecting the icon that represents the command. When a command is selected which applies to the containee object, the server application program receives a message from the operating system indicating the selection, and the server application program processes the message by performing the selected command. However, because commands applying to the container object are disabled, the user cannot execute the commands supported by the container application program.
Also, some conventional systems provide compound documents. A compound document may contain information in different formats. For example, a compound document may contain data in text format, such as a word processing document, or in chart format, such as a worksheet. In particular a xe2x80x9cMICROSOFT WORDxe2x80x9d document may be a compound document which contains a xe2x80x9cMICROSOFT POWERPOINTxe2x80x9d graph and a xe2x80x9cMICROSOFT EXCELxe2x80x9d worksheet. The xe2x80x9cMICROSOFT WORDxe2x80x9d document is a container object which contains containee objects, the xe2x80x9cMICROSOFT POWERPOINTxe2x80x9d graph and the xe2x80x9cMICROSOFT EXCELxe2x80x9d worksheet. A containee object may be embedded in the container object or the containee object may be linked to the container object. When a containee object is embedded in the container object, the containee object is stored in the container object. When a containee object is linked in a container object, the container object includes a link (i.e., a reference) to the containee object. As discussed above, each containee object is associated with a server application program. In addition, typically, the container application program associated with the container object provides commands which apply to all of the compound document (e.g., a save command). However, the container application program typically cannot programmatically dispatch a request to execute a command to a server application program which is associated with a particular containee object in the compound document (e.g., the container application program cannot request the server application program to save its associated object).
Furthermore, in some conventional systems, the server application program can programmatically dispatch a request to execute commands to the container application program. In other conventional systems, the container application program can programmatically dispatch a request to execute commands to the server application program. However, typically, conventional systems are not available in which the container application program and the server application program may both programmatically dispatch requests to execute commands to the other.
In addition, in some conventional systems, a high-level function is provided which enables a container application program to dispatch a request to execute commands to a server application program and which enables a server application program to dispatch a request to execute commands to a container application program. However, typically, the high-level function is very complicated. In addition, conventional systems typically require the use of complex data structures for passing information which is used to execute a command when using the high-level function.
The above-described difficulties encountered by conventional systems are overcome by the present invention. In accordance with a first aspect of the present invention, a method is practiced in a data processing system. In this method, a first application and a second application are provided. The second application has a plurality of commands, and each of the commands represents an action which is performable by the second application and which has a status that indicates a current condition of that command. The first application requests the status of one of the commands from the second application. The second application then determines the status of the requested one of the commands and forwards the status to the first application. Then, the first application receives the status of the requested one of the commands from the second application.
In accordance with an additional aspect of the present invention, a method is practiced in a data processing system. In this method, a first application and a second application are provided. The second application has a plurality of commands, and each of the commands represents an action which is performable by the second application. The first application requests a name of one of the commands from the second application. The name provides a textual representation of one of the commands. The second application determines the name of the requested one of the commands and forwards the determined name to the first application. Then, the first application receives the determined name from the second application.
In accordance with yet another aspect of the present invention, a method is practiced in a data processing system. A first application and a second application are provided. The second application has a plurality of commands, and each of the commands represents an action which is performable by the second application and has a status that indicates a current condition of that command. The first application requests a textual representation of the status of one of the commands from the second application. The second application determines the status of the requested one of the commands. Next, the second application determines the textual representation of the status of the requested one of the commands. Then, the second application forwards the determined textual representation of the status of the requested one of the commands to the first application. The first application receives the determined textual representation of the status of the requested one of the commands from the second application.
In accordance with a further aspect of the present invention, a method is practiced in a data processing system which includes a processor running a first application. A second application with associated commands is provided, and each of the associated commands represents an action which is performable by the second application. Under control of the first application, one of the associated commands of the second application is executed. Then, under control of the second application, the action represented by the executed one of the associated commands is performed.
In accordance with a still further aspect of the present invention, a method is practiced in a data processing system. In this method, a first application and a second application are provided. The first application provides a compound document, which is a word processing document that contains data in different formats, including server data in a server format. In addition, the first application has a first command which represents an action which is performable by the first application on the compound document. The second application enables viewing and editing of the server data contained in the compound document provided by the first application. The second application has a second command which represents an action which is performable by the second application on the server data. Moreover, a video display is provided for displaying the first command and the second command. When the displayed first command is selected by a user, the first application performs the action represented by the first command on the compound document. When the displayed second command is selected by the user, the second application performs the action represented by the second command on the server data contained in the compound document provided by the first application.
In accordance with another aspect of the present invention, a method is practiced in a data processing system which includes a video display and a processor running a first application and a second application. The first application has a first object and a first window environment. The second application has a second object which is contained within the first object. In addition, the first application has a first command which represents an action which is performable by the first application on the first object. Also, the second application has a second command which represents an action which is performable by the second application on the second object. The first object is displayed within the first window environment on the video display. The second object is displayed within the first object in the displayed first window environment on the video display. The first command and the second command are displayed on the video display. When the displayed first command is selected by a user, the first application performs the action represented by the displayed first command on the first object. When the displayed second command is selected by the user, the second application performs the action represented by the displayed second command on the second object.
In accordance with yet another aspect of the present invention, a method is practiced in a data processing system. A processor that runs a first application and a second application is provided. The second application has associated commands, and each of the associated commands represents an action which is performable by the second application. A highlevel command is provided which is executable by the first application to execute one of the associated commands of the second application, with the first application specifying one of the associated commands. The first application executes the high-level command, specifying one of the associated commands. Then, the second application performs the action represented by the specified one of the associated commands.
In accordance with a further aspect of the present invention, a method is practiced in a data processing system. A processor that runs a first application and a second application is provided. The second application has associated commands, and each of the associated commands represents an action which is performable by the second application. A high-level command is provided which is executable by the first application to obtain status information on one of the associated commands, with the first application specifying one of the associated commands. The first application executes the high-level command, specifying one of the associated commands. Then, the second application provides status information on the specified one of the associated commands.
In accordance with a still further aspect of the present invention, a data processing system includes a processor that runs a first application and a second application. The second application has associated commands, and each of the associated commands represents an action which is performable by the second application. The data processing system also includes a video display for displaying each of the associated commands. In addition, the data processing system includes a status message generator for determining status information about one of the associated commands of the second application. The status message generator includes a status message receiver for receiving from the first application a request for status information about one of the associated commands of the second application, with the request specifying one of the associated commands. The status message generator also includes a status message source for retrieving from the second application the requested status information about the specified one of the associated commands. Moreover, the status message generator includes a status message provider for returning to the first application the requested status information.
In accordance with an additional aspect of the present invention, a data processing system includes a processor that runs a first application and a second application. The second application has associated commands, and each of the associated commands represents an action which is performable by the second application. The data processing system also includes a video display for displaying each of the associated commands. In addition the data processing system includes a command executing mechanism for executing one of the associated commands of the second application. The command executing mechanism includes a command receiver for receiving from the first application a request to execute one of the associated commands of the second application, with the request specifying one of the associated commands. The command executing mechanism also includes a command performer for performing the action represented by the specified one of the associated commands at the second application.
In accordance with yet another aspect of the present invention, on a computer-readable storage medium, a first application program and a second application program are stored. The first application program dispatches a request for status information to the second application program. Then, the second application program obtains the requested status information and forwards the obtained status information to the first application program.
In accordance with still another aspect of the present invention, on a computer-readable storage medium, a first application program and a second application program are stored. The first application program dispatches a request to the second application program to perform an action. Then, the second application program performs the action.